home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / NCPASHEL.IN_ / ncpashel.inf
INI File  |  1996-07-12  |  13KB  |  341 lines

  1. [StfVariableDetect]
  2.     !STF_PROCESSOR = "" ? $(!LIBHANDLE) GetProcessor
  3.     !STF_PLATFORM  = "I386"        
  4.     !STF_LANGUAGE   = "" ? $(!LIBHANDLE) GetLanguage
  5.     LanguageList   = ^(LanguageID, 1)
  6.     !STF_WINDOWSPATH    = "" ? $(!LIBHANDLE) GetWindowsNtDir
  7.     !STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  8.     !STF_NTPATH         = $(!STF_WINDOWSPATH)
  9.     !STF_COMPUTERNAME   = "" ? $(!LIBHANDLE) GetMyComputerName
  10.     !STF_BUSTYPE        = "" ? $(!LIBHANDLE) GetMyBusType
  11.     !STF_BUSTYPELIST    = "" ? $(!LIBHANDLE) GetMyBusTypeList
  12. [StfVariableSyms]
  13.     !ProcessorID_I386  = I386
  14.     !ProcessorID_I486  = I486
  15.     !ProcessorID_I586  = I586
  16.     !ProcessorID_R4000 = R4000
  17.     !ProcessorID_Alpha = Alpha_AXP
  18.     !ProcessorID_PPC601  = PPC601
  19.     !ProcessorID_PPC603  = PPC603
  20.     !ProcessorID_PPC604  = PPC604
  21.     !ProcessorID_PPC620  = PPC620
  22.     !PlatformID_I386   = I386
  23.     !PlatformID_Mips   = Mips
  24.     !PlatformID_Alpha  = Alpha
  25.     !PlatformID_PPC    = ppc
  26.     !STF_PRODUCT        = WINNT    
  27.     !STF_USERNAME       = ""       
  28.     !STF_INSTALL_MODE   = "CUSTOM" 
  29.     !STF_UPDGRADE       = NO       
  30.     !STF_NCDETECT       = NO       
  31.     !STF_NCOPTION       = ""       
  32.     !STF_NCDETCARD      = 99999    
  33.     !STF_NCDETINFO      = {}       
  34.     !STF_NC_PARAMS      = {}       
  35.     !STF_NC_PNAMES      = {}       
  36.     !STF_SRCDIR_KEYED   = ""       
  37.     !STF_SRCDIR_USED    = ""       
  38.     !STF_SRCDIR_OVERRIDE = ""      
  39.     !STF_SRCDIR_WINNT   = ""       
  40.     !STF_TEMPLATE_CRITERR = "CRITERR2"
  41.     !STF_TEMPLATE_NONCRITERR = "NONCRITERR2"
  42.     !STF_INSTALLED_OS = {} ? $(!LIBHANDLE) GetInstalledOSNames
  43.     FatalErrorIndex = 1
  44.     Exit_Code = 0
  45. [DoAskOemsetupSource]
  46.     read-syms DoAskUpgradeSrcDlgText$(!STF_LANGUAGE)
  47.     shell "subroutn.inf" DoAskSourceEx $($0) $(DlgText)
  48.     Return $($R0) $($R1) $($R2) $($R3)
  49. [Shell Commands]
  50.      set-title "Windows NT Setup"
  51.      Set !G:DebugOutputControl = 0
  52.      LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
  53.      Set !NCPA_HANDLE = ""
  54.      Ifstr(i) $(!NTN_InfSection) != OemSoftwareInstall
  55.          Debug-Output "NCPASHEL.INF: LoadLibrary on "$(!STF_CWDDIR)ncpa.cpl
  56.          LoadLibrary "y" $(!STF_CWDDIR)ncpa.cpl !NCPA_HANDLE
  57.      Endif
  58.      Shell "subroutn.inf" ReadSetupHelpIds
  59.      SetHelpFile "NetCfg.hlp" $(!MinimumID) $(!MaximumID)
  60.      set-subst LF = "\n"
  61.      StartWait
  62.      read-syms StfVariableSyms
  63.      read-syms StfVariableDetect
  64.      detect StfVariableDetect
  65.      Set !STF_NTPATH = $(!STF_WINDOWSSYSPATH)
  66.      OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\ProductOptions" 33554432 KeyProductOption
  67.      ifstr(i) $(KeyProductOption) != ""
  68.          GetRegValue $(KeyProductOption) "ProductType" ProductTypeList
  69.          set TempProductType = *($(ProductTypeList),4)
  70.          ifstr(i) $(TempProductType) == "winnt"
  71.              set !STF_PRODUCT = WINNT
  72.          else-ifstr(i) $(TempProductType) == "lanmannt"
  73.              set !STF_PRODUCT = LANMANNT
  74.          else-ifstr(i) $(TempProductType) == "servernt"
  75.              set !STF_PRODUCT = SERVERNT
  76.          endif
  77.          CloseRegKey $(KeyProductOptions)
  78.      endif
  79.      Debug-Output "NCPASHEL.INF: STF_SRCDIR is "$(!STF_SRCDIR)
  80.      Debug-Output "NCPASHEL.INF: NTN_SRCPATH is "$(!NTN_SRCPATH)
  81.      Ifstr(i) $(!NTN_SRCPATH) != ""
  82.          Set !STF_ORIGINAL_SRCDIR = $(!STF_SRCDIR)
  83.          Set !STF_SRCDIR = $(!NTN_SRCPATH)
  84.          Debug-Output "NCPASHEL.INF: Reset STF_SRCDIR to:"$(!STF_SRCDIR)
  85.      else
  86.          OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows Nt\CurrentVersion" $(!REG_KEY_READ) KeyNt
  87.          Ifstr(i) $(KeyNt) != ""
  88.              GetRegValue $(KeyNt) "SourcePath" SourcePathValue
  89.              Set !STF_SRCDIR = *($(SourcePathValue),4)
  90.              Debug-Output "NCPASHEL.INF: SourcePath retrieved is "$(!STF_SRCDIR)
  91.              CloseRegKey $(KeyNt)
  92.          Endif
  93.          Ifstr(i) $(!STF_SRCDIR) == ""
  94.            Set !STF_SRCDIR = "A:\"
  95.          Endif
  96.      Endif
  97.      Set SetupInp = 0
  98.      Set !NTN_InstallPhase = secondary
  99.      ifstr(i) $(!NTN_OVERIDEPHASE) != ""
  100.          Set !NTN_InstallPhase = $(!NTN_OVERIDEPHASE)
  101.      Else
  102.          OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\Setup" $(!REG_KEY_READ) KeySetup
  103.          Ifstr(i) $(KeySetup) != ""
  104.              GetRegValue $(KeySetup) "SystemSetupInProgress" SetupInpValue
  105.              Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  106.                  Set SetupInp = *($(SetupInpValue),4)
  107.                  Debug-Output "NCPASHEL.INF: SetupInp = "$(SetupInp)
  108.              Endif
  109.              Ifint $(SetupInp) == 1
  110.                  Set !NTN_InstallPhase = primary
  111.                  GetRegValue $(KeySetup) "WinntPath" SetupPathValue
  112.                  Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  113.                      Set !STF_SRCDIR_WINNT = *($(SetupPathValue),4)
  114.                      Debug-Output "NCPASHEL.INF: STF_SRCDIR_WINNT = "$(!STF_SRCDIR_WINNT)
  115.                  Endif
  116.              Endif
  117.              CloseRegKey $(KeySetup)
  118.          Endif
  119.      EndIf
  120.      Debug-Output "NCPASHEL.INF: NTN_InstallPhase = "$(!NTN_InstallPhase)
  121.      Debug-Output "NCPASHEL.INF: NTN_InfSection = "$(!NTN_InfSection)
  122.      Debug-Output "NCPASHEL.INF: NTN_InstallMode = "$(!NTN_InstallMode)
  123.    Ifstr(i) $(!NTN_Origination) == "install"
  124.         Goto skipdetection
  125.    Endif
  126.    Ifstr(i) $(!NTN_InfSection) == BindingsReview
  127.         Goto skipdetection
  128.    Endif
  129.    Ifstr(i) $(!NTN_InstallMode) == install
  130.         Goto startdetection
  131.    Endif
  132.    Ifstr(i) $(!NTN_InstallMode) == configure
  133.         Goto startdetection
  134.    Endif
  135.    Goto skipdetection
  136. startdetection = +
  137.    Ifstr(i) $(!NCPA_HANDLE) != ""
  138.        Debug-Output "NCPASHEL.INF: Enable netcard detection from NCPA.CPL"
  139.        Shell "NCPARAM.INF" Param_ControlDetection DTSTART
  140.    Endif
  141. skipdetection = +
  142.      ifstr(i) $(!STF_PROCESSOR) == $(!ProcessorID_I386)
  143.          set !STF_PLATFORM = $(!PlatformID_I386)
  144.          set !SYS      = $(!ProcessorID_I386)
  145.      else-ifstr(i) $(!STF_PROCESSOR) == $(!ProcessorID_I486)
  146.          set !STF_PLATFORM = $(!PlatformID_I386)
  147.          set !SYS      = $(!ProcessorID_I386)
  148.      else-ifstr(i) $(!STF_PROCESSOR) == $(!ProcessorID_I586)
  149.          set !STF_PLATFORM = $(!PlatformID_I386)
  150.          set !SYS      = $(!ProcessorID_I386)
  151.      else-ifstr(i) $(!STF_PROCESSOR) == $(!ProcessorID_R4000)
  152.          set !STF_PLATFORM = $(!PlatformID_Mips)
  153.          set !SYS      = $(!ProcessorID_R4000)
  154.      else-ifstr(i) $(!STF_PROCESSOR) == $(!ProcessorID_Alpha)
  155.          set !STF_PLATFORM = $(!PlatformID_Alpha)
  156.          set !SYS      = $(!ProcessorID_Alpha)
  157.      else-ifstr(i) $(!STF_PROCESSOR) == $(!ProcessorID_PPC601)
  158.          set !STF_PLATFORM = $(!PlatformID_PPC)
  159.          set !SYS      = $(!ProcessorID_PPC601)
  160.      else-ifstr(i) $(!STF_PROCESSOR) == $(!ProcessorID_PPC603)
  161.          set !STF_PLATFORM = $(!PlatformID_PPC)
  162.          set !SYS      = $(!ProcessorID_PPC603)
  163.      else-ifstr(i) $(!STF_PROCESSOR) == $(!ProcessorID_PPC604)
  164.          set !STF_PLATFORM = $(!PlatformID_PPC)
  165.          set !SYS      = $(!ProcessorID_PPC604)
  166.      else-ifstr(i) $(!STF_PROCESSOR) == $(!ProcessorID_PPC620)
  167.          set !STF_PLATFORM = $(!PlatformID_PPC)
  168.          set !SYS      = $(!ProcessorID_PPC620)
  169.      else
  170.          set !STF_PLATFORM = $(!PlatformID_I386)
  171.          set !SYS      = $(!ProcessorID_I386)
  172.      endif
  173.      Ifstr(i) $(!STF_LANGUAGE) != "ENG"    
  174.          Debug-Output "NCPASHEL: Language not set to English; resetting"
  175.          !STF_LANGUAGE = "ENG"
  176.      Endif
  177.      read-syms ProgressCopy$(!STF_LANGUAGE)
  178.     Ifstr(i) $(!NTN_RegBase) == ""
  179.         set !NTN_RegBase = ""
  180.     Endif
  181.     set !NTN_ServiceBase  = "SYSTEM\CurrentControlSet\SERVICES"
  182.     Ifstr(i) $(!NTN_InstallMode) == ""
  183.         Debug-Output "NCPASHEL:!NTN_InstallMode was not defined!"
  184.         set !NTN_InstallMode  = "configure"
  185.     Endif
  186.     Ifstr(i) $(!NTN_SoftwareBase) == ""
  187.         set !NTN_SoftwareBase = "SOFTWARE"
  188.     Endif
  189.     Ifstr(i) $(!NTN_Origination) == ""
  190.         set !NTN_Origination = "ncpa"
  191.     Endif
  192.     Ifstr(i) $(!NTN_Infname) == ""
  193.         goto fatalnoinfname
  194.     Endif
  195.     Ifstr(i) $(!NTN_InfSection) == ""
  196.         Set !NTN_InfSection = "InstallOption"
  197.     Endif
  198.     ifstr(i) $(!NTN_InstallMode) == "Update"
  199.         Debug-Output "NCPASHEL.INF: Upgrade mode"
  200.         Shell "" DoAskOemsetupSource $(!STF_SRCDIR)
  201.         Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  202.             goto shellerror
  203.         Endif
  204.         ifstr(i) $($R0) == STATUS_SUCCESSFUL
  205.             set !STF_SRCDIR = $($R1)
  206.         else-ifstr(i) $($R0) == STATUS_USERCANCEL
  207.             set Exit_Code = 1
  208.             goto end
  209.         else
  210.             set Exit_Code = 2
  211.             goto end
  212.         endif
  213.         Set !NTN_Infname = $(!STF_SRCDIR)oemsetup.inf
  214.     endif
  215.     Ifstr(i) $(!NTN_InstallMode) == install
  216.         set AddCopy  = YES
  217.         set DoCopy   = YES
  218.         set DoConfig = YES
  219.     Else-ifstr(i) $(!NTN_InstallMode) == "Update"
  220.         set AddCopy  = YES
  221.         set DoCopy   = YES
  222.         set DoConfig = NO
  223.         Debug-Output "NCPASHEL.INF: Shell to "$(!NTN_Infname)
  224.         Shell $(!NTN_Infname) ReturnOptions $(!STF_LANGUAGE)
  225.         Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  226.            Debug-Output "NCPASHEL.INF: SHELL ERROR: "$($ShellCode)
  227.            goto shellerror
  228.         Endif
  229.         Ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
  230.            IfContains(i) $(!NTN_InfOption) in $($R1)
  231.               goto ContinueUpgrade
  232.            endif
  233.         endif
  234.         read-syms IncorrectOemsetupDisk$(!STF_LANGUAGE)
  235.         shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorText)
  236.         set Exit_Code = 1
  237.         goto end
  238. ContinueUpgrade = +
  239.     Endif
  240.     ifstr(i) $(!NTN_SRCPATH) != ""
  241.         Set !STF_SRCDIR_OVERRIDE = $(!STF_SRCDIR)
  242.     Endif
  243.     Shell $(!NTN_Infname) $(!NTN_InfSection) +
  244.          $(!STF_LANGUAGE) $(!NTN_InfOption) +
  245.          $(!STF_SRCDIR) $(AddCopy) $(DoCopy) $(DoConfig)
  246.     Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  247.        Debug-Output "NCPASHEL.INF: SHELL ERROR: "$($ShellCode)
  248.        goto shellerror
  249.     Endif
  250.     Debug-Output "NCPASHEL: INF return: "$($R0)
  251.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  252.         set Exit_Code = 0
  253.     else-ifstr(i) $($R0) == STATUS_USERCANCEL
  254.         set Exit_Code = 1
  255.     else-ifstr(i) $($R0) == STATUS_NO_EFFECT
  256.         set Exit_Code = 3
  257.     else-ifstr(i) $($R0) == STATUS_REBIND
  258.         set Exit_Code = 4
  259.     else-ifstr(i) $($R0) == STATUS_REBOOT
  260.         set Exit_Code = 5
  261.     else
  262.         set Exit_Code = 2
  263.     Endif
  264.     EndWait
  265.     goto end
  266. shellerror = +
  267.    read-syms ShellError$(!$ShellCode)$(!STF_LANGUAGE)
  268.    Debug-Output "NCPASHEL: SHELL ERROR: "$(Error)
  269.    goto fatal
  270. fatalnoinfname = +
  271.    set FatalErrorIndex = 2
  272.    goto fatalmsg
  273. fatalmsg = +
  274.    read-syms FatalError$(FatalErrorIndex)$(!STF_LANGUAGE)
  275.    Debug-Output "NCPASHEL: FATAL ERROR: "$(Error)
  276.    goto fatal
  277. fatal = +
  278.    read-syms FatalDlg$(!STF_LANGUAGE)
  279.    ui start "FatalError"
  280.    goto end
  281. end = +
  282.    Ifstr(i) $(!LIBHANDLE) != ""
  283.        LibraryProcedure DontCare, $(!LIBHANDLE), DeleteAllConnections
  284.    Endif
  285.    Debug-Output "NCPASHEL: NCPASHEL: returning to NCPA"
  286.    goto term
  287. term = +
  288.    Debug-Output "NCPASHEL: Bye."
  289.    exit
  290. [Source Media Descriptions]
  291.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  292. [Signature]
  293.     FileType = MICROSOFT_FILE
  294. [GetSignature]
  295.     read-syms Signature
  296.     return $(FileType)
  297. [ProductType]
  298. STF_PRODUCT  = LanmanNT
  299. STF_PLATFORM = I386
  300. [Files-Inf]
  301. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  302. [LanguageID]
  303.    ENG
  304. [LanguageTextENG]
  305.    "English (United States)"
  306. [ProgressCopyENG]
  307.     ProCaption   = "Windows NT Networking Setup"
  308.     ProCancel    = "Cancel"
  309.     ProCancelMsg = "Windows NT is not correctly installed.  Are you sure you want "+
  310.                    "to cancel copying files?"
  311.     ProCancelCap = "Setup Message"
  312.     ProText1     = "Copying:"
  313.     ProText2     = "To:"
  314.     PlatformID_I386 = I386
  315.     PlatformID_Mips = Mips
  316.     PlatformID_PPC  = ppc
  317. [FatalDlgENG]
  318. STF_MB_TITLE = "Setup Message"
  319. DlgType = "MessageBox"
  320. STF_MB_TEXT  = $(Error)
  321. STF_MB_TYPE  = 1
  322. STF_MB_ICON  = 3
  323. STF_MB_DEF   = 1
  324. [FatalError1ENG]
  325. Error = "Initialization failed"
  326. [FatalError2ENG]
  327. Error = "No INF file name given (NTN_Infname)"
  328. [FatalError3ENG]
  329. Error = "Invocation of INF file "$(!NTN_Infname)" failed"
  330. [ShellError1ENG]
  331. Error = "INF file "$(!NTN_Infname)" does not exist"
  332. [ShellError2ENG]
  333. Error = "INF file "$(!NTN_Infname)" does not have a section named "$(!NTN_InfSection)
  334. [ShellError3ENG]
  335. Error = "INF file "$(!NTN_Infname)", section "$(!NTN_InfSection)" has syntax errors"
  336. [DoAskUpgradeSrcDlgTextENG]
  337.     DlgText        = "Please enter the full path for the upgrade/update "+
  338.                      "OEMSETUP.INF file. Then choose Continue."
  339. [IncorrectOemsetupDiskENG]
  340.     ErrorText      = "Update aborted. The OEMSETUP.INF does not support upgrade for the specified component."
  341.